package com.xunyji.consumer.controller;

import com.xunyji.consumer.rest_api.RestApi_Feign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王杨帅
 * @create 2018-08-25 21:17
 * @desc
 **/
@RestController
@RequestMapping(value = "/consumer")
@Slf4j
public class TestController {

    @Autowired
    private RestApi_Feign restApiFeign;

    @GetMapping(value = "/hello")
    public String hello() {
        String result = restApiFeign.connect();
        log.info("远程调用结果为：" + result);
        return result + " - 2018年8月25日21:20:24 + wys";
    }

}

